@echo off
setlocal EnableDelayedExpansion
color A

set PackageName=libmfx
set LibraryName=libmfx
set ProjectName=libmfx
set SourceCDX=%SourcePath%\%packageName%
set BuildPath=%BuildPathX%\%~n0\%Platform1%

:: cmake source
set SpecialCMakeParam=""
call %RootPath%src\vcmake.cmd %PackageName% %LibraryName% %ProjectName% %SourceCDX% %BuildPath% %SpecialCMakeParam%

:: modify install
set "libmfxPC=%PCInstall%\libmfx.pc"
call powershell -Command "(gc '%libmfxPC%') -replace '2013', '1.35.0' | Out-File %libmfxPC% -encoding ASCII"

set "strOld=supc\++"
set "strNew=Advapi32"
call powershell -Command "(gc '%libmfxPC%') -replace '%strOld%', '%strNew%' | Out-File %libmfxPC% -encoding ASCII"
